<template>
  <div>
    <TextCom :msg="msg" @listen="showMsg"></TextCom>
  </div>
</template>

<script>
import TextCom from "../components/TextCom";
export default {
  data() {
    return {
      msg: "父组件的数据",
    };
  },
  components: {
    TextCom,
  },
  methods: {
    showMsg(user) {
      console.log(user);
    },
  },
};
</script>

<style>
</style>